package com.food.eat.util;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Author RenPu
 * @Date 2022/6/27 18:00
 * @Version 1.0
 * @Description: 响应对象实体类的封装
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ResponseBean<T> implements Serializable {

    private Boolean mark;
     private Integer code;
     private String msg;
     private T data;



    public static ResponseBean error(Integer code, String msg){
        return ResponseBean.builder().code(code).msg(msg).build();
    }







}
